﻿<div class="with-progress" data-bind="spinner: spinner">
    <table class="hex-editor">
        <thead>
            <tr>
                <th>Address</th>
                <!-- ko foreach: cols -->
                <th data-bind="text: $parent.formatByte($data), css: { 'hex-0': $index() == 0, 'hex-8': $index() == 8 }"></th>
                <!-- /ko -->
                <th data-bind="attr: { colspan: cols().length }"></th>
            </tr>
        </thead>
        <tbody data-bind="foreach: lines">
            <tr>
                <td data-bind="text: $parent.formatAddress($data.address())"></td>
                <!-- ko foreach: data -->
                <td class="hex" data-bind="css: {'hex-0': $index() == 0, 'hex-8': $index() == 8 }">
                    <input type="text" maxlength="2" data-bind="hexByte: $parent.data[$index()]" />
                </td>
                <!-- /ko -->
                 <!-- ko foreach: data -->
                <td class="char" data-bind="text: $parents[1].formatChar($parent.data[$index()]())"></td>
                <!-- /ko -->
            </tr>
        </tbody>
    </table>
</div>
